@extends('layout.index');
@section('title', '用户添加');
@section('content')
     <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">用户添加</h1>
                </div>
                <!-- /.col-lg-12 -->
 		</div>
 		<div class="row">
                <div class="col-lg-4">
				<!-- 表单验证 错误提示位置 -->
		         @if (count($errors) > 0)
	                <div class="alert alert-danger alert-dismissable">
	                    <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
		                    <ul>
		                        @foreach ($errors->all() as $error)
		                            <li>{{ $error }}</li>
		                        @endforeach
		                    </ul>
	                </div>
		         @endif
                    <form role="form" action="/admin/user/insert" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label>用户名</label>
                            <input class="form-control" name="username" value="{{old('username')}}" type="text">
                            <p class="help-block"></p> 
                        </div>
                         <div class="form-group">
                            <label>密码</label>
                            <input class="form-control" name="password"  type="password">
                            <p class="help-block"></p> 
                        </div>      
                        <div class="form-group">
                            <label>确认密码</label>
                            <input class="form-control" name="repassword" type="password">
                            <p class="help-block"></p> 
                        </div>
                         <div class="form-group">
                            <label>邮箱</label>
                            <input class="form-control" name="email" value="{{old('email')}}" type="text">
                            <p class="help-block"></p> 
                        </div>
                         <div class="form-group">
                            <label>手机</label>
                            <input class="form-control" name="phone" type="text">
                            <p class="help-block"></p> 
                        </div>
                        <div class="form-group">
                            <label>头像</label>
                            <input type="file" name="pic">
                        </div>
                       <button class="btn btn-info" type="submit">提交</button>
                       <button class="btn btn-info" type="reset">重置</button>
                       {{csrf_field()}}
                    </form>
                </div>
                                <!-- /.col-lg-6 (nested) -->
       </div> 
@endsection

